<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML>
<html>
<head>
	<title>事务处理</title>
	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	<link href="<%= basePath %>assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
	<link href="<%= basePath %>assets/css/bui-min.css" rel="stylesheet" type="text/css" />
	<link href="<%= basePath %>assets/css/page-min.css" rel="stylesheet" type="text/css" />
	<link href="<%= basePath %>assets/css/prettify.css" rel="stylesheet" type="text/css" />
	
	<style type="text/css">
		body {
			width: 85%;
		}
		
		.doc-content {
			padding-bottom: 30px;
		}
		
		.panel {
			margin-top: 10px;
			width: 100%;
			margin-left: 10%;
		}
		
		.doc-content .panel1 .panel-header {
			text-align: center;
			background: #F2DEDE;
		}
		
		.doc-content .panel0 .panel-header {
			text-align: center;
			background: #90E9F4;
		}
		
		.doc-content .panel2 .panel-header {
			text-align: center;
			background: #D9EDF7;
		}
		
		.doc-content .panel3 .panel-header {
			text-align: center;
			background: #DFF0D8;
		}
		
		.panel-header h3 {
			font-size: 20px;
			letter-spacing: 5px;
		}
		
		.row {
			padding-top: 20px;
			padding-left: 0px;
		}
		
		.row table {
			width: 80%;
			margin-left: 10%;
		}
	</style>
</head>
<body>
	<div class="doc-content">
		<!-- 待拾取列表 -->
		<div class="panel panel1">
			<div class="panel-header">
				<h3>待拾取</h3>
			</div>
			<div class="panel-body">
				<div class="row">
					<table class="table">
						<thead>
							<tr>
								<th>事务状态</th>
								<th>事务种类</th>
								<th>事务明细</th>
								<th>上报单位</th>
								<th>超时时间</th>
								<th>催办次数</th>
								<th>上报时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="#needClaimList" var="transaction">
								<tr>
									<td>
										<s:if test="#transaction.tstate == -2">已终止</s:if>
										<s:elseif test="#transaction.tstate == -1">已回收</s:elseif>
										<s:elseif test="#transaction.tstate == 0">待初审响应</s:elseif>
										<s:elseif test="#transaction.tstate == 1">待审核</s:elseif>
										<s:elseif test="#transaction.tstate == 2">待处理响应</s:elseif>
										<s:elseif test="#transaction.tstate == 3">待处理</s:elseif>
										<s:elseif test="#transaction.tstate == 4">待办结</s:elseif>
										<s:elseif test="#transaction.tstate == 5">已办结</s:elseif>
										<s:else>未知</s:else>
									</td>
									<td><s:property value="#transaction.ttname"/></td>
									<td><s:property value="#transaction.tdname"/></td>
									<td><s:property value="#transaction.tdeptname"/></td>
									<td> 
										<%-- 如果超时了，显示红色字体 --%>
										<s:if test="#transaction.ttimeout >= #nowdate">
											<font color="red">
												<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
											</font>
										</s:if>
										<%-- 否则按正常字体显示 --%>
										<s:else>
											<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
										</s:else>
									</td>
									<td><s:property value="#transaction.turge"/></td>
									<td><s:date name="#transaction.tsubmittime" format="yyyy年MM月dd日 HH:mm:ss"/></td>
									<td><a href="<%= basePath %>transaction/findTransactionDetail?transaction.tid=<s:property value="#transaction.tid"/>">查看详情</a></td>
								</tr>
							</s:iterator>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		
		<!-- 待处理列表 -->
		<div class="panel panel0">
			<div class="panel-header">
				<h3>待处理</h3>
			</div>
			<div class="panel-body">
				<div class="row">
					<table class="table">
						<thead>
							<tr>
								<th>事务状态</th>
								<th>事务种类</th>
								<th>事务明细</th>
								<th>上报单位</th>
								<th>超时时间</th>
								<th>催办次数</th>
								<th>上报时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="#needDealList" var="transaction">
								<tr>
									<td>
										<s:if test="#transaction.tstate == -2">已终止</s:if>
										<s:elseif test="#transaction.tstate == -1">已回收</s:elseif>
										<s:elseif test="#transaction.tstate == 0">待初审响应</s:elseif>
										<s:elseif test="#transaction.tstate == 1">待审核</s:elseif>
										<s:elseif test="#transaction.tstate == 2">待处理响应</s:elseif>
										<s:elseif test="#transaction.tstate == 3">待处理</s:elseif>
										<s:elseif test="#transaction.tstate == 4">待办结</s:elseif>
										<s:elseif test="#transaction.tstate == 5">已办结</s:elseif>
										<s:else>未知</s:else>
									</td>
									<td><s:property value="#transaction.ttname"/></td>
									<td><s:property value="#transaction.tdname"/></td>
									<td><s:property value="#transaction.tdeptname"/></td>
									<td>
										<%-- 如果超时了，显示红色字体 --%>
										<s:if test="#transaction.ttimeout >= #nowdate">
											<font color="red">
												<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
											</font>
										</s:if>
										<%-- 否则按正常字体显示 --%>
										<s:else>
											<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
										</s:else>
									</td>
									<td><s:property value="#transaction.turge"/></td>
									<td><s:date name="#transaction.tsubmittime" format="yyyy年MM月dd日 HH:mm:ss"/></td>
									<td><a href="<%= basePath %>transaction/findTransactionDetail?transaction.tid=<s:property value="#transaction.tid"/>">查看详情</a></td>
								</tr>
							</s:iterator>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		
		<!-- 关注中列表 -->
		<div class="panel panel2">
			<div class="panel-header">
				<h3>关注中</h3>
			</div>
			<div class="panel-body">
				<div class="row">
					<table class="table">
						<thead>
							<tr>
								<th>事务状态</th>
								<th>事务种类</th>
								<th>事务明细</th>
								<th>上报单位</th>
								<th>超时时间</th>
								<th>催办次数</th>
								<th>上报时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="#followingList" var="transaction">
								<tr>
									<td>
										<s:if test="#transaction.tstate == -2">已终止</s:if>
										<s:elseif test="#transaction.tstate == -1">已回收</s:elseif>
										<s:elseif test="#transaction.tstate == 0">待初审响应</s:elseif>
										<s:elseif test="#transaction.tstate == 1">待审核</s:elseif>
										<s:elseif test="#transaction.tstate == 2">待处理响应</s:elseif>
										<s:elseif test="#transaction.tstate == 3">待处理</s:elseif>
										<s:elseif test="#transaction.tstate == 4">待办结</s:elseif>
										<s:elseif test="#transaction.tstate == 5">已办结</s:elseif>
										<s:else>未知</s:else>
									</td>
									<td><s:property value="#transaction.ttname"/></td>
									<td><s:property value="#transaction.tdname"/></td>
									<td><s:property value="#transaction.tdeptname"/></td>
									<td>
										<%-- 如果超时了，显示红色字体 --%>
										<s:if test="#transaction.ttimeout >= #nowdate">
											<font color="red">
												<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
											</font>
										</s:if>
										<%-- 否则按正常字体显示 --%>
										<s:else>
											<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
										</s:else>
									</td>
									<td><s:property value="#transaction.turge"/></td>
									<td><s:date name="#transaction.tsubmittime" format="yyyy年MM月dd日 HH:mm:ss"/></td>
									<td><a href="<%= basePath %>transaction/findTransactionDetail?transaction.tid=<s:property value="#transaction.tid"/>">查看详情</a></td>
								</tr>
							</s:iterator>
						</tbody>
					</table>

				</div>
			</div>
		</div>

		<!-- 已完结列表 -->
		<div class="panel panel3">
			<div class="panel-header">
				<h3>已完结</h3>
			</div>
			<div class="panel-body">
				<div class="row">
					<table class="table">
						<thead>
							<tr>
								<th>事务状态</th>
								<th>事务种类</th>
								<th>事务明细</th>
								<th>上报单位</th>
								<th>超时时间</th>
								<th>催办次数</th>
								<th>上报时间</th>
								<td>操作</td>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="#finishedList" var="transaction">
								<tr>
									<td>
										<s:if test="#transaction.tstate == -2">已终止</s:if>
										<s:elseif test="#transaction.tstate == -1">已回收</s:elseif>
										<s:elseif test="#transaction.tstate == 0">待初审响应</s:elseif>
										<s:elseif test="#transaction.tstate == 1">待审核</s:elseif>
										<s:elseif test="#transaction.tstate == 2">待处理响应</s:elseif>
										<s:elseif test="#transaction.tstate == 3">待处理</s:elseif>
										<s:elseif test="#transaction.tstate == 4">待办结</s:elseif>
										<s:elseif test="#transaction.tstate == 5">已办结</s:elseif>
										<s:else>未知</s:else>
									</td>
									<td><s:property value="#transaction.ttname"/></td>
									<td><s:property value="#transaction.tdname"/></td>
									<td><s:property value="#transaction.tdeptname"/></td>
									<td>
										<%-- 如果超时了，显示红色字体 --%>
										<s:if test="#transaction.ttimeout >= #nowdate">
											<font color="red">
												<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
											</font>
										</s:if>
										<%-- 否则按正常字体显示 --%>
										<s:else>
											<s:date name="#transaction.ttimeout" 
													format="yyyy年MM月dd日 HH:mm:ss"/>
										</s:else>
									</td>
									<td><s:property value="#transaction.turge"/></td>
									<td><s:date name="#transaction.tsubmittime" format="yyyy年MM月dd日 HH:mm:ss"/></td>
									<td><a href="<%= basePath %>transaction/findTransactionDetail?transaction.tid=<s:property value="#transaction.tid"/>">查看详情</a></td>
								</tr>
							</s:iterator>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
<body>
</html>
